package com.labtalk.admin.utils;

public class StringUtil {
    public static String toString(int n, int length) {
        String nStr = String.valueOf(n);
        int len = nStr.length();
        if(length > len) {
            for(int i = 0; i < length - len; i++) {
                nStr = "0" + nStr;
            }
        }
        return nStr;
    }

    public static String toString(String nStr, int length) {
        int len = nStr.length();
        if(length > len) {
            for(int i = 0; i < length - len; i++) {
                nStr = "0" + nStr;
            }
        }
        return nStr;
    }
}
